import { ApiProperty } from '@midwayjs/swagger';

// 上传接口返回
export class StationFileUploadResultDTO {
  @ApiProperty({ description: '唯一标识', example: 'abc123.xlsx' })
  fileKey: string;

  @ApiProperty({ description: '保存路径', example: '/upload/abc123.xlsx' })
  filePath: string;

  @ApiProperty({ description: '原始名', example: 'xxxx.xlsx' })
  originalName: string;

  @ApiProperty({ description: 'MIME类型', example: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
  mimeType: string;           // 注意统一用mimeType

  @ApiProperty({ description: '文件大小', example: 23456 })
  size: number;

  @ApiProperty({ description: '上传时间', example: '2025-06-11T18:28:12' })
  uploadTime: Date;

  @ApiProperty({ description: '主键ID', example: 'xxxx-xxx' })
  id: string;
}

// 元信息登记
export class StationMetaCreateDTO {
  @ApiProperty({ description: '文件key，upload接口返回' })
  fileKey: string;

  @ApiProperty({ description: '测站ID' })
  stationId: string;

  @ApiProperty({ description: '测站类型ID' })
  stationTypeId: string;
}

// 查询元信息列表
export class StationMetaListDTO {
  @ApiProperty({ required: false })
  stationId?: string;

  @ApiProperty({ required: false })
  stationTypeId?: string;

  @ApiProperty({ required: false, example: 1 })
  page?: number;

  @ApiProperty({ required: false, example: 10 })
  pageSize?: number;
}

export class IdDTO {
  @ApiProperty()
  id: string;
}



export class FileKeyQueryDTO {
  @ApiProperty({ description: '文件唯一Key', example: '1749638254701-l1z39p.xlsx' })
  fileKey: string;
}
